package mn.idax.exchange.otc.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * Create by jack_huang on 2018/8/19
 */
@Getter
@AllArgsConstructor
public enum AccountTransactionEnum {


    TRANSACTIONTYPE_CREATEORDER(30,"otc_create_order"),
    TRANSACTIONTYPE_CANCELORDER(31,"otc_cancel_order"),
    TRANSACTIONTYPE_RELEASEORDER(32,"otc_release_order"),
    TRANSACTIONTYPE_TRANSFER(33,"otc_transfer"),

//    TRANSACTIONTYPE_OTC_BUY(33,"otc_transfer_to_buyer"),
//    TRANSACTIONTYPE_OTC_SELL(34,"otc_transfer_to_seller")


    ;

    private Integer code;
    private String remark;

    public static String getRemark(Integer code) {
        for (AccountTransactionEnum transactionEnum : AccountTransactionEnum.values()) {
            if(transactionEnum.getCode().equals(code)){
                return transactionEnum.getRemark();
            }
        }
        return null;
    }
}
